﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Default.master" AutoEventWireup="true" CodeBehind="RoleList.aspx.cs" Inherits="Runda.EShop.SaaS.SysManage.RoleList" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="~/UserControl/LeftMenu.ascx" TagPrefix="uc" TagName="LeftMenu" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
<script type="text/javascript">
    function OnRoleAdd(URL) {
        $.ligerDialog.open({ url: URL, width: 800, height: 500, modal: true, isResize: true, title: '角色信息维护' });
        return false;
    }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphLeft" runat="server">
    <uc:LeftMenu runat="server" ID="ucLeftMenu" TopMenuCode="Func5000" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
    <div class="i_tablebt_xian" style="margin: 10px 0px 0px 0px; width: 100%;">
        <span class="l"><img src="<%=ResolveUrl("~/images/ico/down_16x16.gif")%>" align="absmiddle" />角色列表</span>
    </div>
      <table border="0" cellspacing="0" cellpadding="0" class="i_tablebt_xian" style="margin: 10px 0 0 0;width: 728px;">
        <tr>
            <td><span class="banner6 r" style="margin: 3px 10px 3px 0;">
                <asp:LinkButton ID="lnkbtnAddRole" runat="server">新增角色</asp:LinkButton>
            </span></td>
        </tr>
    </table>
    <div class="clear"></div>
    <asp:GridView ID="gvRoleList" runat="server" AutoGenerateColumns="False" OnRowDeleting="gvRoleList_RowDeleting" DataKeyNames="RoleID">
        <Columns>
         <asp:BoundField DataField="RoleName" HeaderText="角色名称" />
            <asp:TemplateField HeaderText="是否系统角色">
                <ItemTemplate>
                    <asp:Label ID="lblIsSystem" runat="server" Text='<%# Eval("IsSystem").ToString() == "1"?"是":"否" %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
          <asp:BoundField DataField="RoleDesc" HeaderText="角色描述" />
          <asp:BoundField DataField="CreatedOn" HeaderText="创建时间" />
           <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                   <asp:LinkButton ID="lnkbtnEdit" runat="server" Visible='<%# Eval("IsSystem").ToString() == "1"?false:true %>' OnClientClick='<%# "return OnRoleAdd(\"RoleAdd.aspx?RoleID=" + Eval("RoleID") + "\");" %>'>修改</asp:LinkButton>
                <asp:LinkButton ID="lnkbtnDelete" runat="server" Visible='<%# Eval("IsSystem").ToString() == "1"?false:true %>' CommandName="delete" CommandArgument='<%#Eval("RoleID") %>' OnClientClick="return confirm('删除角色可能会影响用户的权限功能，确定删除吗?');">删除</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>            
        </asp:GridView>
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" CurrentPageButtonClass="cpb" 
        CustomInfoHTML="第%CurrentPageIndex%页，共%PageCount%页，每页%PageSize%条" 
        ShowCustomInfoSection="Left" CustomInfoSectionWidth="180px" 
        NumericButtonCount="10" onpagechanged="AspNetPager1_PageChanged"></webdiyer:AspNetPager>
    <asp:Button ID="btnQuery" runat="server" Text="查询" onclick="btnQuery_Click" style="display:none;"/>
</asp:Content>
